package cn.jsj.machine.service;

import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Validated
public interface UserService {

    /**
     * 用户登录接口，登录失败返回-1，登陆成功则返回用户身份标识。
     * 0为员工用户登陆成功，1为管理员登录成功
     * @param account
     * @param password
     * @return
     */
    @Valid
    public Integer userLogin(@NotNull@Min(value = 1) Integer account,@NotBlank@Length(max = 15,min = 5) String password);

    
}
